class: center, middle, inverse, title-slide # Starting a map in {ggplot2} --- layout: true <div class="dk-footer"> <span> <a href="https://rfortherestofus.com/" target="_blank">R for the Rest of Us </a> </span> </div> --- class: center, middle, dk-section-title background-image:url("images/pexels-photo-7431661.jpeg") background-size: cover # Starting a map in {ggplot2} --- > How much context does your map need? <center> <img src="data:image/png;base64,#02_02_starting-a-map-in-ggplot2_files/figure-html/unnamed-chunk-3-1.png" width="100%" /> </center> --- # Map tiles with {ggspatial} The {ggspatial} package provides access to 15 different map types: ```r rosm::osm.types() ``` ``` ## [1] "osm" "opencycle" "hotstyle" ## [4] "loviniahike" "loviniacycle" "hikebike" ## [7] "hillshade" "osmgrayscale" "stamenbw" ## [10] "stamenwatercolor" "osmtransport" "thunderforestlandscape" ## [13] "thunderforestoutdoors" "cartodark" "cartolight" ``` --- <center> <img src='images/gg-osm-types.png' width='90%'/> </center> --- # Using annotation_map_tile() - `annotation_map_tile(zoomin = -2)` is the default and will likely download too few tiles for a good chart